/**
 * LoginHistory.java
 * cn.feigme.identity.model
 * @author Feigme 
 * 2008-2-6
 */
package cn.feigme.identity.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * @author Feigme 
 *
 */
@Entity
@Table(name="pf_login_history_tbl")
public class LoginHistory implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private String id;
	private Date loginDate;
	private String loginAddress;
	
	private User user;
	
	@Id   
    @GeneratedValue(generator = "system-uuid")   
    @GenericGenerator(name = "system-uuid", strategy = "uuid")   
	public String getId() {return id;}
	public void setId(String id) {this.id = id;}
	
	@Temporal(value = TemporalType.TIMESTAMP)
	public Date getLoginDate() {return loginDate;}
	public void setLoginDate(Date loginDate) {this.loginDate = loginDate;}

	public String getLoginAddress() {return loginAddress;}
	public void setLoginAddress(String loginAddress) {this.loginAddress = loginAddress;}
	
	@ManyToOne()
	public User getUser() {return user;}
	public void setUser(User user) {this.user = user;}
	
}
